package com.liuche.homechat.common;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationPropertiesScan;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.core.env.Environment;

/**
 * @author zhongzb
 * @date 2021/05/27
 */
@SpringBootApplication(scanBasePackages = {"com.liuche.homechat"})
@MapperScan({"com.liuche.homechat.common.*.mapper"})
@ServletComponentScan
@ConfigurationPropertiesScan
@Slf4j
@EnableAspectJAutoProxy(exposeProxy = true)
public class HomechatCustomApplication {

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(HomechatCustomApplication.class);
        Environment env = app.run(args).getEnvironment();
        log.info("启动成功！！");
        log.info("地址: \thttp://localhost:{}/doc.html", env.getProperty("server.port"));
    }

}